<?xml version="1.0" encoding="UTF-8"?>
<html filename="docs/BSAXHelpers/TBufferedXMLFilterImpl.html">
<body>
<a id="#top"/>
<h1>
	                Class Summary : TBufferedXMLFilterImpl </h1> Buffered Base class for deriving an XML filter.

 <p>This class is designed to sit between an <a href="../BSAX/IBufferedXMLReader.html">IBufferedXMLReader</a>
 and the client application's event handlers.  By default, it
 does nothing but pass requests up to the reader and events
 on to the handlers unmodified, but subclasses can override
 specific methods to modify the event stream or the configuration
 requests as they pass through.</p>

<h2>
	              Methods
	            </h2>
<div style="padding-left:10px">
<a href="#setupParse">
	                  procedure
	                 setupParse()</a>
<br/>
<a href="#setParent">
	                  procedure
	                 setParent(IBufferedXMLReader)</a>
<br/>
<a href="#getParent">
	                  function
	                 getParent() : IBufferedXMLReader</a>
<br/>
<a href="#getFeature">
	                  function
	                 getFeature(SAXString) : Boolean</a>
<br/>
<a href="#setFeature">
	                  procedure
	                 setFeature(SAXString, Boolean)</a>
<br/>
<a href="#getProperty">
	                  function
	                 getProperty(SAXString) : IProperty</a>
<br/>
<a href="#setEntityResolver">
	                  procedure
	                 setEntityResolver(IEntityResolver)</a>
<br/>
<a href="#getEntityResolver">
	                  function
	                 getEntityResolver() : IEntityResolver</a>
<br/>
<a href="#setDTDHandler">
	                  procedure
	                 setDTDHandler(IBufferedDTDHandler)</a>
<br/>
<a href="#getDTDHandler">
	                  function
	                 getDTDHandler() : IBufferedDTDHandler</a>
<br/>
<a href="#setContentHandler">
	                  procedure
	                 setContentHandler(IBufferedContentHandler)</a>
<br/>
<a href="#getContentHandler">
	                  function
	                 getContentHandler() : IBufferedContentHandler</a>
<br/>
<a href="#setErrorHandler">
	                  procedure
	                 setErrorHandler(IErrorHandler)</a>
<br/>
<a href="#getErrorHandler">
	                  function
	                 getErrorHandler() : IErrorHandler</a>
<br/>
<a href="#parse">
	                  procedure
	                 parse(IInputSource)</a>
<br/>
<a href="#parse">
	                  procedure
	                 parse(SAXString)</a>
<br/>
<a href="#resolveEntity">
	                  function
	                 resolveEntity(SAXString, SAXString) : IInputSource</a>
<br/>
<a href="#notationDecl">
	                  procedure
	                 notationDecl(PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#unparsedEntityDecl">
	                  procedure
	                 unparsedEntityDecl(PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#setDocumentLocator">
	                  procedure
	                 setDocumentLocator(ILocator)</a>
<br/>
<a href="#startDocument">
	                  procedure
	                 startDocument()</a>
<br/>
<a href="#endDocument">
	                  procedure
	                 endDocument()</a>
<br/>
<a href="#startPrefixMapping">
	                  procedure
	                 startPrefixMapping(PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#endPrefixMapping">
	                  procedure
	                 endPrefixMapping(PSAXChar, Integer)</a>
<br/>
<a href="#startElement">
	                  procedure
	                 startElement(PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer, IBufferedAttributes)</a>
<br/>
<a href="#endElement">
	                  procedure
	                 endElement(PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#characters">
	                  procedure
	                 characters(PSAXChar, Integer)</a>
<br/>
<a href="#ignorableWhitespace">
	                  procedure
	                 ignorableWhitespace(PSAXChar, Integer)</a>
<br/>
<a href="#processingInstruction">
	                  procedure
	                 processingInstruction(PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#skippedEntity">
	                  procedure
	                 skippedEntity(PSAXChar, Integer)</a>
<br/>
<a href="#warning">
	                  procedure
	                 warning(ISAXParseError)</a>
<br/>
<a href="#error">
	                  procedure
	                 error(ISAXParseError)</a>
<br/>
<a href="#fatalError">
	                  procedure
	                 fatalError(ISAXParseError)</a>
<br/>
</div>
<br/>
<hr width="100%"/>
<a name="#setupParse">
<p>
<b>procedure</b> setupParse(); </p>
</a> Set up before a parse.

 <p>Before every parse, check whether the parent is
 non-nil, and re-register the filter for all of the
 events.</p>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setParent">
<p>
<b>procedure</b> setParent(<b>const</b> parent : IBufferedXMLReader); </p>
</a> Set the parent reader.

 <p>This is the <a href="../BSAX/IBufferedXMLReader.html">IBufferedXMLReader</a> from which
 this filter will obtain its events and to which it will pass its
 configuration requests.  The parent may itself be another filter.</p>

 <p>If there is no parent reader set, any attempt to parse
 or to set or get a feature or property will fail.</p>
<br/><b>Parameter : </b> parent The parent reader.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedXMLFilterImpl.html#getParent">TBufferedXMLFilterImpl.getParent</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getParent">
<p>
<b>function</b> getParent() : IBufferedXMLReader; </p>
</a> Get the parent reader.

 <p>This method allows the application to query the parent
 reader (which may be another filter).  It is generally a
 bad idea to perform any operations on the parent reader
 directly: they should all pass through this filter.</p>

<br/><b>Result : </b> The parent filter, or nil if none has been set.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedXMLFilterImpl.html#setParent">TBufferedXMLFilterImpl.setParent</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getFeature">
<p>
<b>function</b> getFeature(<b>const</b> name : SAXString) : Boolean; </p>
</a> Look up the value of a feature.

 <p>This will always fail if the parent is nil.</p>

<br/><b>Parameter : </b> name The feature name, which is a fully-qualified URI.
<br/><b>Result : </b> The current value of the feature (true or false).
<br/><b>Exception : </b> ESAXNotRecognizedException If the feature
            value can't be assigned or retrieved.
<br/><b>Exception : </b> ESAXNotSupportedException When the
            XMLReader recognizes the feature name but
            cannot determine its value at this time.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setFeature">
<p>
<b>procedure</b> setFeature(<b>const</b> name : SAXString;  value : Boolean); </p>
</a> Set the value of a feature.

 <p>This will always fail if the parent is nil.</p>

<br/><b>Parameter : </b> name The feature name, which is a fully-qualified URI.
<br/><b>Parameter : </b> state The requested value of the feature (true or false).
<br/><b>Exception : </b> ESAXNotRecognizedException If the feature
            value can't be assigned or retrieved.
<br/><b>Exception : </b> ESAXNotSupportedException When the
            XMLReader recognizes the feature name but
            cannot set the requested value.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getProperty">
<p>
<b>function</b> getProperty(<b>const</b> name : SAXString) : IProperty; </p>
</a> Look up the interface value of a property.

<br/><b>Parameter : </b> name The property name, which is a fully-qualified URI.
<br/><b>Result : </b>s An Interface that allows the getting and setting of the property
<br/><b>Exception : </b> ESAXNotRecognizedException If the property
            interface cannot be retrieved.
<br/><b>Exception : </b> ESAXNotSupportedException When the
            XMLReader recognizes the property name but
            cannot determine its interface value at this time.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setEntityResolver">
<p>
<b>procedure</b> setEntityResolver(<b>const</b> resolver : IEntityResolver); </p>
</a> Set the entity resolver.

<br/><b>Parameter : </b> resolver The entity resolver.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getEntityResolver">
<p>
<b>function</b> getEntityResolver() : IEntityResolver; </p>
</a> Get the current entity resolver.

<br/><b>Result : </b> The current entity resolver, or nil if none
         has been registered.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setDTDHandler">
<p>
<b>procedure</b> setDTDHandler(<b>const</b> handler : IBufferedDTDHandler); </p>
</a> Set the DTD event handler.

<br/><b>Parameter : </b> handler The DTD handler.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getDTDHandler">
<p>
<b>function</b> getDTDHandler() : IBufferedDTDHandler; </p>
</a> Get the current DTD event handler.

<br/><b>Result : </b> The current DTD handler, or null if none
         has been registered.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setContentHandler">
<p>
<b>procedure</b> setContentHandler(<b>const</b> handler : IBufferedContentHandler); </p>
</a> Set the content event handler.

<br/><b>Parameter : </b> handler The content handler.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getContentHandler">
<p>
<b>function</b> getContentHandler() : IBufferedContentHandler; </p>
</a> Get the content event handler.

<br/><b>Result : </b> The current content handler, or nil if none
         has been registered.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setErrorHandler">
<p>
<b>procedure</b> setErrorHandler(<b>const</b> handler : IErrorHandler); </p>
</a> Set the error event handler.

<br/><b>Parameter : </b> handler The error handler.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getErrorHandler">
<p>
<b>function</b> getErrorHandler() : IErrorHandler; </p>
</a> Get the current error event handler.

<br/><b>Result : </b> The current error handler, or nil if none
         has been registered.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#parse">
<p>
<b>procedure</b> parse(<b>const</b> input : IInputSource); </p>
</a> Parse a document.

<br/><b>Parameter : </b> source The input source for the top-level of the
        XML document.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>Exception : </b> Exception An IO exception from the parser,
            possibly from a byte stream
            supplied by the application.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#parse">
<p>
<b>procedure</b> parse(<b>const</b> systemId : SAXString); </p>
</a> Parse a document.

<br/><b>Parameter : </b> systemId The system identifier (URI).
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>Exception : </b> Exception An IO exception from the parser,
            possibly from a byte stream
            supplied by the application.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#resolveEntity">
<p>
<b>function</b> resolveEntity(<b>const</b> publicId : SAXString; <b>const</b> systemId : SAXString) : IInputSource; </p>
</a> Filter an external entity resolution.

<br/><b>Parameter : </b> publicId The public identifier of the external entity
        being referenced, or empty if none was supplied.
<br/><b>Parameter : </b> systemId The system identifier of the external entity
        being referenced.
<br/><b>Result : </b> An IInputSource interface describing the new input source,
         or null to request that the parser open a regular
         URI connection to the system identifier.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>Exception : </b> Exception A pascal-specific IO exception,
            possibly the result of creating a new Stream
            for the InputSource.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#notationDecl">
<p>
<b>procedure</b> notationDecl( name : PSAXChar;  nameLength : Integer;  publicId : PSAXChar;  publicIdLength : Integer;  systemId : PSAXChar;  systemIdLength : Integer); </p>
</a> Filter a notation declaration event.

<br/><b>Parameter : </b> name The notation name.
<br/><b>Parameter : </b> nameLength The length of the name buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> publicId The notation's public identifier, or empty if
        none was given.
<br/><b>Parameter : </b> publicIdLength The length of the publicId buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> systemId The notation's system identifier, or empty if
        none was given.
<br/><b>Parameter : </b> systemIdLength The length of the systemId buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#unparsedEntityDecl">
<p>
<b>procedure</b> unparsedEntityDecl( name : PSAXChar;  nameLength : Integer;  publicId : PSAXChar;  publicIdLength : Integer;  systemId : PSAXChar;  systemIdLength : Integer;  notationName : PSAXChar;  notationNameLength : Integer); </p>
</a> Filter an unparsed entity declaration event.

<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>Parameter : </b> name The unparsed entity's name.
<br/><b>Parameter : </b> nameLength The length of the name buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> publicId The entity's public identifier, or empty if none
        was given.
<br/><b>Parameter : </b> publicIdLength The length of the publicId buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> systemId The entity's system identifier.
<br/><b>Parameter : </b> systemIdLength The length of the systemId buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> notationName The name of the associated notation.
<br/><b>Parameter : </b> notationNameLength The length of the notationNameLength buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setDocumentLocator">
<p>
<b>procedure</b> setDocumentLocator(<b>const</b> locator : ILocator); </p>
</a> Filter a new document locator event.

<br/><b>Parameter : </b> locator The document locator.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#startDocument">
<p>
<b>procedure</b> startDocument(); </p>
</a> Filter a start document event.

<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#endDocument">
<p>
<b>procedure</b> endDocument(); </p>
</a> Filter an end document event.

<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#startPrefixMapping">
<p>
<b>procedure</b> startPrefixMapping( prefix : PSAXChar;  prefixLength : Integer;  uri : PSAXChar;  uriLength : Integer); </p>
</a> Filter a start Namespace prefix mapping event.

<br/><b>Parameter : </b> prefix The Namespace prefix being declared.
               An empty string is used for the default element namespace,
               which has no prefix.
<br/><b>Parameter : </b> prefixLength The length of the prefix buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> uri The Namespace URI the prefix is mapped to.
<br/><b>Parameter : </b> uriLength The length of the uri buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#endPrefixMapping">
<p>
<b>procedure</b> endPrefixMapping( prefix : PSAXChar;  prefixLength : Integer); </p>
</a> Filter an end Namespace prefix mapping event.

<br/><b>Parameter : </b> prefix The prefix that was being mapping.
               Use the empty string when a default mapping scope ends.
<br/><b>Parameter : </b> prefixLength The length of the prefix buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#startElement">
<p>
<b>procedure</b> startElement( uri : PSAXChar;  uriLength : Integer;  localName : PSAXChar;  localNameLength : Integer;  qName : PSAXChar;  qNameLength : Integer; <b>const</b> atts : IBufferedAttributes); </p>
</a> Filter a start element event.

<br/><b>Parameter : </b> uri The Namespace URI, or the empty string if the
        element has no Namespace URI or if Namespace
        processing is not being performed.
<br/><b>Parameter : </b> uriLength The length of the uri buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> localName The local name (without prefix), or the
        empty string if Namespace processing is not being
        performed.
<br/><b>Parameter : </b> localNameLength The length of the localName buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> qName The qualified name (with prefix), or the
        empty string if qualified names are not available.
<br/><b>Parameter : </b> qNameLength The length of the qName buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> atts The attributes attached to the element.  If
        there are no attributes, it shall be an empty
        IBufferedAttributes object or nil.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#endElement">
<p>
<b>procedure</b> endElement( uri : PSAXChar;  uriLength : Integer;  localName : PSAXChar;  localNameLength : Integer;  qName : PSAXChar;  qNameLength : Integer); </p>
</a> Filter an end element event.

<br/><b>Parameter : </b> uri The Namespace URI, or the empty string if the
        element has no Namespace URI or if Namespace
        processing is not being performed.
<br/><b>Parameter : </b> uriLength The length of the uri buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> localName The local name (without prefix), or the
        empty string if Namespace processing is not being
        performed.
<br/><b>Parameter : </b> localNameLength The length of the localName buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> qName The qualified name (with prefix), or the
        empty string if qualified names are not available.
<br/><b>Parameter : </b> qNameLength The length of the qName buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#characters">
<p>
<b>procedure</b> characters( ch : PSAXChar;  length : Integer); </p>
</a> Filter a character data event.

<br/><b>Parameter : </b> ch A pointer to a buffer of characters.
<br/><b>Parameter : </b> length The number of characters to use from the buffer.
<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#ignorableWhitespace">
<p>
<b>procedure</b> ignorableWhitespace( ch : PSAXChar;  length : Integer); </p>
</a> Filter an ignorable whitespace event.

<br/><b>Parameter : </b> ch A pointer to a buffer of characters.
<br/><b>Parameter : </b> length The number of characters to use from the array.
<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#processingInstruction">
<p>
<b>procedure</b> processingInstruction( target : PSAXChar;  targetLength : Integer;  data : PSAXChar;  dataLength : Integer); </p>
</a> Filter a processing instruction event.

<br/><b>Parameter : </b> target The processing instruction target.
<br/><b>Parameter : </b> targetLength The length of the target buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> data The processing instruction data, or the empty string
        if none was supplied.  The data does not include any
        whitespace separating it from the target.
<br/><b>Parameter : </b> dataLength The length of the data buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#skippedEntity">
<p>
<b>procedure</b> skippedEntity( name : PSAXChar;  nameLength : Integer); </p>
</a> Filter a skipped entity event.

<br/><b>Parameter : </b> name The name of the skipped entity.  If it is a
        parameter entity, the name will begin with '%', and if
        it is the external DTD subset, it will be the string
        &quot;[dtd]&quot;.
<br/><b>Parameter : </b> nameLength The length of the name buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#warning">
<p>
<b>procedure</b> warning(<b>const</b> e : ISAXParseError); </p>
</a> Filter a warning event.

<br/><b>Parameter : </b> e The warning as an exception.
<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#error">
<p>
<b>procedure</b> error(<b>const</b> e : ISAXParseError); </p>
</a> Filter an error event.

<br/><b>Parameter : </b> e The error as an exception.
<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#fatalError">
<p>
<b>procedure</b> fatalError(<b>const</b> e : ISAXParseError); </p>
</a> Filter a fatal error event.

<br/><b>Parameter : </b> e The error as an exception.
<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/>
<p>
<a href="#top">Top</a>
</p>
</body>
</html>